package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MrAnalogValueConfigMapper;
import com.ruoyi.system.domain.MrAnalogValueConfig;
import com.ruoyi.system.service.IMrAnalogValueConfigService;

/**
 * 模拟量值定义配置Service业务层处理
 *
 * @author lsw
 * @date 2025-08-20
 */
@Service
public class MrAnalogValueConfigServiceImpl implements IMrAnalogValueConfigService
{
    @Autowired
    private MrAnalogValueConfigMapper mrAnalogValueConfigMapper;

    /**
     * 查询模拟量值定义配置
     *
     * @param id 模拟量值定义配置主键
     * @return 模拟量值定义配置
     */
    @Override
    public MrAnalogValueConfig selectMrAnalogValueConfigById(Long id)
    {
        return mrAnalogValueConfigMapper.selectMrAnalogValueConfigById(id);
    }

    /**
     * 查询模拟量值定义配置列表
     *
     * @param mrAnalogValueConfig 模拟量值定义配置
     * @return 模拟量值定义配置
     */
    @Override
    public List<MrAnalogValueConfig> selectMrAnalogValueConfigList(MrAnalogValueConfig mrAnalogValueConfig)
    {
        return mrAnalogValueConfigMapper.selectMrAnalogValueConfigList(mrAnalogValueConfig);
    }

    /**
     * 新增模拟量值定义配置
     *
     * @param mrAnalogValueConfig 模拟量值定义配置
     * @return 结果
     */
    @Override
    public int insertMrAnalogValueConfig(MrAnalogValueConfig mrAnalogValueConfig)
    {
        return mrAnalogValueConfigMapper.insertMrAnalogValueConfig(mrAnalogValueConfig);
    }

    /**
     * 修改模拟量值定义配置
     *
     * @param mrAnalogValueConfig 模拟量值定义配置
     * @return 结果
     */
    @Override
    public int updateMrAnalogValueConfig(MrAnalogValueConfig mrAnalogValueConfig)
    {
        return mrAnalogValueConfigMapper.updateMrAnalogValueConfig(mrAnalogValueConfig);
    }

    /**
     * 批量删除模拟量值定义配置
     *
     * @param ids 需要删除的模拟量值定义配置主键
     * @return 结果
     */
    @Override
    public int deleteMrAnalogValueConfigByIds(Long[] ids)
    {
        return mrAnalogValueConfigMapper.deleteMrAnalogValueConfigByIds(ids);
    }

    /**
     * 删除模拟量值定义配置信息
     *
     * @param id 模拟量值定义配置主键
     * @return 结果
     */
    @Override
    public int deleteMrAnalogValueConfigById(Long id)
    {
        return mrAnalogValueConfigMapper.deleteMrAnalogValueConfigById(id);
    }

    /**
     * 关联设备模拟量值查询
     *
     * @param systemId 关联设备
     * @param analogValue 模拟量值
     * @return 结果
     */
    @Override
    public MrAnalogValueConfig selectMrAnalogValueConfigBySystemIdAndAnalogValue(String systemId, Long analogValue) {
        return mrAnalogValueConfigMapper.selectMrAnalogValueConfigBySystemIdAndAnalogValue(systemId, analogValue);
    }
}
